
package Utils.currency;

public class CursSoapProxy implements Utils.currency.CursSoap {
  private String _endpoint = null;
  private Utils.currency.CursSoap cursSoap = null;
  
  public CursSoapProxy() {
    _initCursSoapProxy();
  }
  
  private void _initCursSoapProxy() {
    try {
      cursSoap = (new Utils.currency.CursLocator()).getCursSoap();
      if (cursSoap != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)cursSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)cursSoap)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (cursSoap != null)
      ((javax.xml.rpc.Stub)cursSoap)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public Utils.currency.CursSoap getCursSoap() {
    if (cursSoap == null)
      _initCursSoapProxy();
    return cursSoap;
  }
  
  public double getLatestValue(Utils.currency.IDMoneda moneda) throws java.rmi.RemoteException{
    if (cursSoap == null)
      _initCursSoapProxy();
    return cursSoap.getLatestValue(moneda);
  }
  
  public double getValue(java.util.Calendar theDate, Utils.currency.IDMoneda moneda) throws java.rmi.RemoteException{
    if (cursSoap == null)
      _initCursSoapProxy();
    return cursSoap.getValue(theDate, moneda);
  }
  
  
}